import ItemUtil from '@/ItemUtil';
import RandomUtil from '@/RandomUtil';
export default class Item_带毒小匕首 {
    static id = 'C00G';
    static 释放(x: number, y: number, 来源?: unit, 目标?: unit, d?: any) {
        DamageSystemInstance.applyPoisionDamage(目标, 来源, 1111);
    }
    constructor() {
        EventManager.onTakeAttack(Item_带毒小匕首.spellEffect);
    }
    static spellEffect(d: DamageEventData) {
        if (!ItemUtil.isUnitHasItem(d.source, Item_带毒小匕首.id)) return;
        let r = RandomUtil.randomPercent();
        if (r > 0.11) return;
        Item_带毒小匕首.释放(0, 0, d.source, d.target, d);
    }
}
